package com.yuanfeng.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanfeng.business.dto.ApplyPayOnDeliveryRecordDTO;
import com.yuanfeng.business.dto.ManageSetShopParamQueryDTO;
import com.yuanfeng.business.dto.delivery.DeliveryShopQueryDTO;
import com.yuanfeng.business.entity.ShopCashOnDeliveryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @ClassName ShopCashOnDeliveryMapper
 * @Description 货到付款
 * @Author cyp
 * @Date 2023-05-26 17:20:34
 * @Version 1.0
 **/
@Mapper
public interface ShopCashOnDeliveryMapper extends BaseMapper<ShopCashOnDeliveryEntity> {

    /**
     * 查询店铺是否有货到付款资格
     *
     * @param shopId
     * @return
     */
    Integer queryCountSelectByShopId(@Param("shopId") Integer shopId);

    /**
     * 查询店铺货到付款
     * @param shopId
     * @return
     */
    DeliveryShopQueryDTO queryShopSetDetialDelivery(@Param("shopId")Integer shopId);

    /**
     * 查询店铺详情
     * @param shopId
     * @return
     */
    ManageSetShopParamQueryDTO selectShopDetial(@Param("shopId")String shopId);

    /**
     * 新增申请付款交付记录
     * @param param
     * @return
     */
    Integer insertApplyPayOnDeliveryRecord(@Param("param") ApplyPayOnDeliveryRecordDTO param);

    /**
     * 修改申请付款交付记录
     * @param param
     * @return
     */
    Integer updateApplyPayOnDeliveryRecord(@Param("param") ApplyPayOnDeliveryRecordDTO param);
}
